import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

/// * 作者: Tao
/// * 日期: 2024/3/22
/// * 时间: 11:03
/// * 描述: 屏幕适配工具类
class ScreenUtil {

  /// 设置状态栏透明
  /// * [context] 上下文
  static removeSystemTransparent(BuildContext context){
    // android 平台
    if (Theme.of(context).platform == TargetPlatform.android) {
      SystemUiOverlayStyle style = const SystemUiOverlayStyle(
        statusBarColor: Colors.transparent,
        statusBarIconBrightness: Brightness.dark,
        statusBarBrightness: Brightness.light,
      );
      SystemChrome.setSystemUIOverlayStyle(style);
    }
  }
}